home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / catD / bcanput.z / bcanput
Encoding:
Text File  |  1998-10-30  |  4.5 KB  |  132 lines

  1.  
  2.  
  3.  
  4. bbbbccccaaaannnnppppuuuutttt((((DDDD3333))))                                                        bbbbccccaaaannnnppppuuuutttt((((DDDD3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _bbbb_cccc_aaaa_nnnn_pppp_uuuu_tttt - test for flow control in a specified priority band
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>>
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_ssss_tttt_rrrr_eeee_aaaa_mmmm_...._hhhh_>>>>
  14.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_dddd_dddd_iiii_...._hhhh_>>>>
  15.      _iiii_nnnn_tttt _bbbb_cccc_aaaa_nnnn_pppp_uuuu_tttt_((((_qqqq_uuuu_eeee_uuuu_eeee______tttt _****_q_,,,, _uuuu_cccc_hhhh_aaaa_rrrr______tttt _p_r_i_))))_;;;;
  16.  
  17.    AAAArrrrgggguuuummmmeeeennnnttttssss
  18.      _q         Pointer to the message queue.
  19.  
  20.      _p_r_i       Message priority.
  21.  
  22. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  23.      Like the _cccc_aaaa_nnnn_pppp_uuuu_tttt(D3) function, _bbbb_cccc_aaaa_nnnn_pppp_uuuu_tttt searches through the stream
  24.      (starting at _q) until it finds a queue containing a service routine, or
  25.      until it reaches the end of the stream.  If found, the queue containing
  26.      the service routine is tested to see if a message of priority _p_r_i can be
  27.      enqueued.  If the band is full, _bbbb_cccc_aaaa_nnnn_pppp_uuuu_tttt marks the queue to automatically
  28.      back-enable the caller's service routine when the amount of data in
  29.      messages on the queue has reached its low water mark.
  30.  
  31.    RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss
  32.      _bbbb_cccc_aaaa_nnnn_pppp_uuuu_tttt returns 1 if a message of priority _p_r_i can be sent in the stream,
  33.      or 0 if the priority band is flow-controlled.  If _bbbb_cccc_aaaa_nnnn_pppp_uuuu_tttt reaches the end
  34.      of the stream without finding a queue with a service routine, then it
  35.      returns 1.
  36.  
  37. UUUUSSSSAAAAGGGGEEEE
  38.      The driver is responsible for both testing a queue with _bbbb_cccc_aaaa_nnnn_pppp_uuuu_tttt and
  39.      refraining from placing a message on the queue if _bbbb_cccc_aaaa_nnnn_pppp_uuuu_tttt fails.
  40.  
  41.      It is possible because of race conditions to test for room using _bbbb_cccc_aaaa_nnnn_pppp_uuuu_tttt
  42.      and get an indication that there is room for a message, and then have the
  43.      queue fill up before subsequently enqueuing the message, causing a
  44.      violation of flow control.  This is not a problem, since the violation of
  45.      flow control in this case is bounded.
  46.  
  47.      If _p_r_i is 0, the _bbbb_cccc_aaaa_nnnn_pppp_uuuu_tttt call is equivalent to a call to _cccc_aaaa_nnnn_pppp_uuuu_tttt.
  48.  
  49.    LLLLeeeevvvveeeellll
  50.      Base or Interrupt.
  51.  
  52.    SSSSyyyynnnncccchhhhrrrroooonnnniiiizzzzaaaattttiiiioooonnnn CCCCoooonnnnssssttttrrrraaaaiiiinnnnttttssss
  53.      Does not sleep.
  54.  
  55.      Driver-defined basic locks, read/write locks, and sleep locks may be held
  56.      across calls to this function.
  57.  
  58.  
  59.  
  60.  
  61.                                                                         PPPPaaaaggggeeee 1111
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. bbbbccccaaaannnnppppuuuutttt((((DDDD3333))))                                                        bbbbccccaaaannnnppppuuuutttt((((DDDD3333))))
  69.  
  70.  
  71.  
  72. RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEESSSS
  73.      _cccc_aaaa_nnnn_pppp_uuuu_tttt(D3), _pppp_uuuu_tttt_bbbb_qqqq(D3)
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.                                                                         PPPPaaaaggggeeee 2222
  128.  
  129.  
  130.  
  131.